#!/usr/bin/python
# encoding: utf-8
'''
@File    :   code.py
@Time    :   2020/03/11 21:54:19
@Author  :   fangkaijin 
@Version :   1.0
@Contact :   fangkaijin@gmail.com
@License :   杭州移动互联
@Desc    :   None
'''

# 导入库包

import sys, os
import math

#object 表示StudentObj 继承 object
class StudentObj(object):

# 相当于构造函数
    def __init__(self, name, score, teacher = '小黄老师'):
        self._name = name
        self._score = score
        self._teacher = teacher

    def getName(self):
        return self._name
    def getScore(self):
        return self._score
    def getTeacher(self):
        return self._teacher

    def setName(self, name):
        self._name = name
    def setScore(self, score):
        self._score = score
    def setTeacher(self, teacher):
        self._teacher = teacher


    def print_score(self):
        print('name, score %s: %.2f' % (self._name, self._score))
        print(round(2.123456, 2))

    def printLevel(self):
        if(self._score >= 90):
            print('教师%s给学生%s的成绩评级为A' % (self._teacher, self._name))
        elif(self._score >= 80):
            print('教师%s给学生%s的成绩评级为B' % (self._teacher, self._name))
        elif(self._score >= 60):
            print('教师%s给学生%s的成绩评级为C' % (self._teacher, self._name))
        else:
            print('教师%s给学生%s的成绩评级为D' % (self._teacher, self._name))
